package com.hu.article.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hu.article.mapper.CommentMapper;
import com.hu.article.service.ICommentService;
import com.hu.common.pojo.Comment;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 留言表 服务实现类
 * </p>
 *
 * @author hu
 * @since 2023-09-10
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements ICommentService {
    @Resource
    private CommentMapper commentMapper;

    public List<Comment> findCommentDetail(Integer blogId) {
        return commentMapper.findCommentDetail(blogId);
    }

    @Override
    public int countPid(Integer id) {
        return commentMapper.countPid(id);
    }

    @Override
    public Integer getBlogIdByCommentId(Integer id) {
        return commentMapper.getBlogIdByCommentId(id);
    }
}
